package com.hnkywl.sts.quartz;

import com.hnkywl.sts.service.taskdeal.DoPlanImport;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.scheduling.quartz.QuartzJobBean;

/**
 * 查询业务科室，对计划明细，导入保供中失败的记录，重新导入
 * Created with IntelliJ IDEA.
 * User: nianjunyan
 * Date: 13-5-18
 * Time: 下午2:25
 * To change this template use File | Settings | File Templates.
 */
public class PlanImprtJob extends QuartzJobBean {

    // 定义日志
    private static Log log = LogFactory.getLog(PlanImprtJob.class);
    // 处理资金分配service
    private DoPlanImport doPlanImport;

    @Override
    protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        log.info("FundAllotJob 开始执行............");
        doPlanImport.importPlan();
        log.info("FundAllotJob 执行结束............");
    }

    public DoPlanImport getDoPlanImport() {
        return doPlanImport;
    }

    public void setDoPlanImport(DoPlanImport doPlanImport) {
        this.doPlanImport = doPlanImport;
    }
}
